# Contributor: Clayton Craft <clayton@craftyguy.net>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=tz
pkgver=0.7.0
pkgrel=3
pkgdesc="interactive TUI program that displays time across a few time zones of your choosing"
url="https://github.com/oz/tz"
arch="all"
license="GPL-3.0-or-later"
makedepends="go"
depends="tzdata"
options="net"
source="$pkgname-$pkgver.tar.gz::https://github.com/oz/tz/archive/refs/tags/v$pkgver.tar.gz"

export GOFLAGS="$GOFLAGS -modcacherw"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -v .
}

check() {
	go test ./...
}

package() {
	install -Dm755 "tz" "$pkgdir/usr/bin/tz"
}

sha512sums="
f140602c951230244c11305057c2c5b03f37c285c3a609fde2b3049e56b2de983a277c488b28ea27fc92cb7d77009a570ee32bc48a75be060d13a0b38888cf28  tz-0.7.0.tar.gz
"
